home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / workbench werkzeuge / bildschirmschoner / bserver_v1.5 / guide (.txt) < prev    next >
Amigaguide Document  |  1996-04-07  |  54KB  |  1,271 lines

  1. @DATABASE BServer
  2. @NODE MAIN "Bserver documentation"
  3.                          BServer version 1.5
  4.               Copyright 
  5.  1994, 1995 by Stefano Reksten
  6.                      of 3AM - The Three Amigos !!!
  7.  CONTENTS OF THIS FILE:
  8.  @{"DISCLAIMER" link DISCLAIMER}
  9.  @{"COPYRIGHT and CARDWARE" link COPYRIGHT}
  10.  @{"WHAT'S BSERVER?" link WHATIS}
  11.  @{"WHAT DOES BSERVER NEED?" link NEED}
  12.  @{"INSTALLING BSERVER" link INSTALLING}
  13.  @{"RUNNING BSERVER FROM CLI" link CLI}
  14.  @{"USING BSERVER FROM WORKBENCH" link WBENCH}
  15.  @{"CLIENTLIST" link CLIENTLIST} file format
  16.  @{"MORE ABOUT CLIENTS" link CLIENTS}
  17.  @{"WRITING CLIENTS" link WRITING_CLIENTS}
  18.  @{"Autodocs" link AUTODOCS} for client.library
  19.  @{"HISTORY AND FUTURE" link HISTORY}
  20.  @{"KNOWN BUGS" link BUGS}
  21.  @{"TROUBLESHOOTING" link TROUBLE}
  22.  @{"HOW TO CONTACT THE AUTHOR" link AUTHOR}
  23. @ENDNODE
  24. @NODE DISCLAIMER "Disclaimer"
  25.  DISCLAIMER
  26.  ---------------------------------------------------------------------------
  27.     The author is *NOT* responsible for the suitability or accuracy of  this
  28.  documentation and/or the program(s)  it describes.  Any damage  directly or
  29.  indirectly caused by the use or  misuse of this  documentation  and/or  the
  30.  program(s) it describes is the sole responsibility of the user her/him self
  31.  ---------------------------------------------------------------------------
  32. @ENDNODE
  33. @NODE COPYRIGHT "This is for real!"
  34.  COPYRIGHT
  35.  ---------------------------------------------------------------------------
  36.  BServer  v1.5, Copyright 
  37.  1994-95 by Stefano Reksten. All rights reserved.
  38.  This program may be distributed  non-commercially only  providing that  the
  39.  executable,  source  code,  documentation  and   copyright  notices  remain
  40.  unchanged and are included with the distribution.
  41.  The archive should contain the following directories/files:
  42.     BServer_v1.5/
  43.         Clients/
  44.             8SVX/
  45.                 Balls.boing
  46.                 ChunLi.scream
  47.                 Clock.smp1
  48.                 Clock.smp2
  49.                 Lemming.OhNo!
  50.                 Lemming.Youpy
  51.                 Noise.snd
  52.                 Zangief.laugh
  53.                 Zangief.scream
  54.             ILBM/
  55.                 DisplayIFF.BRS
  56.                 PT_Frames.BRS
  57.             MISC/
  58.                 Fortune.data
  59.             Balls
  60.             Balls.info
  61.             BlackScreen
  62.             BlackScreen.info
  63.             ChunLi
  64.             ChunLi.info
  65.             Clock
  66.             Clock.info
  67.             Curves
  68.             Curves.info
  69.             Dhalsim
  70.             Dhalsim.info
  71.             DisplayIFF
  72.             DisplayIFF.info
  73.             Eyes
  74.             Eyes.info
  75.             FadeScreen
  76.             FadeScreen.info
  77.             Fireworks
  78.             Fireworks.info
  79.             Fortune
  80.             Fortune.info
  81.             Hopalong
  82.             Hopalong.info
  83.             Invaders
  84.             Invaders.info
  85.             KillDMA
  86.             KillDMA.info
  87.             Lemming
  88.             Lemming.info
  89.             Life
  90.             Life.info
  91.             Lightning
  92.             Lightning.info
  93.             Majiks
  94.             Majiks.info
  95.             Mandelbrot
  96.             Mandelbrot.info
  97.             Maze
  98.             Maze.info
  99.             Melt
  100.             Melt.info
  101.             Multiline
  102.             Multiline.info
  103.             Noise
  104.             Noise.info
  105.             PacMan
  106.             PacMan.info
  107.             Plasma
  108.             Plasma.info
  109.             Poly
  110.             Poly.info
  111.             PT_Player
  112.             PT_Player.info
  113.             RandomDots
  114.             RandomDots.info
  115.             RastaParrot
  116.             RastaParrot.info
  117.             ScreenFall
  118.             ScreenFall.info
  119.             Shade
  120.             Shade.info
  121.             Shadows
  122.             Shadows.info
  123.             Shuffle
  124.             Shuffle.info
  125.             ShutScreen
  126.             ShutScreen.info
  127.             Spotlight
  128.             Spotlight.info
  129.             StarField
  130.             StarField.info
  131.             TicTacToe
  132.             TicTacToe.info
  133.             World
  134.             World.info
  135.             Worms
  136.             Worms.info
  137.             Zangief
  138.             Zangief.info
  139.         Catalogs/
  140.             Deutsch/
  141.                 BServer.catalog
  142.             Fran
  143.                 BServer.catalog
  144.             Italiano/
  145.                 BServer.catalog
  146.             Norsk/
  147.                 BServer.catalog
  148.             Svenska/
  149.                 BServer.catalog
  150.         Libs/
  151.             @{"bitmap.library" link CUSTOMLIBS}
  152.             @{"client.library" link CUSTOMLIBS}
  153.         Sources/
  154.             clients/
  155.                 ChunLi/
  156.                     ChunLi.c
  157.                     ChunLiData.c*
  158.                 Dhalsim/
  159.                     Dhalsim.c
  160.                     DhalsimData.c*
  161.                 Lemming/
  162.                     Lemming.c
  163.                     LemmingData.c*
  164.                 PacMan/
  165.                     PacMan.c
  166.                     PacManData.c*
  167.                 Shadows/
  168.                     Shadows.c
  169.                     ShadowsData.c*
  170.                 World/
  171.                     World.c
  172.                     WorldData.c*
  173.                     WorldData2.c*
  174.                 Zangief/
  175.                     Zangief.c
  176.                     ZangiefData.c*
  177.                 Balls.c
  178.                 BlackScreen.c
  179.                 Clock.c
  180.                 Curves.c
  181.                 DisplayIFF.c
  182.                 Eyes.c
  183.                 FadeScreen.c
  184.                 Fireworks.c
  185.                 Fortune.c
  186.                 Generic.c
  187.                 Hopalong.c
  188.                 Invaders.c
  189.                 KillDMA.c
  190.                 Life.c
  191.                 Lightning.c
  192.                 Majiks.c
  193.                 Mandelbrot.c
  194.                 Maze.c
  195.                 Melt.c
  196.                 Multiline.c
  197.                 Noise.c
  198.                 Plasma.c
  199.                 Poly.c
  200.                 PT_Player.c
  201.                 RandomDots.c
  202.                 RastaParrot.c
  203.                 ScreenFall.c
  204.                 Shade.c
  205.                 Shuffle.c
  206.                 ShutScreen.c
  207.                 Spotlight.c
  208.                 StarField.c
  209.                 TicTacToe.c
  210.                 Worms.c
  211.             GFX/
  212.                 ChunLi.lha
  213.                 Dhalsim.lha
  214.                 invaders.img
  215.                 Lemming.lha
  216.                 PacMan.lha
  217.                 Shadows.lha
  218.                 World.lha
  219.                 Zangief.lha
  220.             include/
  221.                 bitmap/
  222.                     bitmap.h
  223.                     bitmap_pragmas.h
  224.                 client.h
  225.                 client_pragmas.h
  226.                 server.h
  227.             lib/
  228.                 libsources/
  229.                     bitmap.fd
  230.                     bitmap_chunky.s
  231.                     bitmap_library.c
  232.                     client.fd
  233.                     client_library.c
  234.                     Decrunch30.o
  235.                     PTPlay.s
  236.                 client.lib
  237.             server/
  238.                 catalogs/
  239.                     BServer.cd
  240.                     BServer_Dansk.ct
  241.                     BServer_Deutsch.ct
  242.                     BServer_Espa
  243. ol.ct
  244.                     BServer_Fran
  245. ais.ct
  246.                     BServer_Italiano.ct
  247.                     BServer_Nederlands.ct
  248.                     BServer_Norsk.ct
  249.                     BServer_Portogu
  250.                     BServer_Svenska.ct
  251.                 askfiles.c
  252.                 bserver.c
  253.                 builtin_blanker.c
  254.                 commodity.c
  255.                 gadgets.c
  256.                 makefile
  257.                 modeid.c
  258.                 startclients.c
  259.                 window.c
  260.         BServer
  261.         BServer.info
  262.         ClientList
  263.         ClientList.info
  264.         Clients.info
  265.         Guide
  266.         Guide.info
  267.         Sources.info
  268.     BServer_v1.5.info
  269.  (*) These files are obtained with BtoC and are not included due to their
  270.  size.
  271.  Please note that the Sources directory comes in an archive.
  272.  ChunLi, Zangief and Dhalsim are Trademarks of CAPCOM,
  273.  Pacman is a Trademark of NAMCO,
  274.  Lemmings is a Trademark of DMA design,
  275.  RastaParrot is a Trademuck of Jamaikan of 3AM,
  276.  and Mandelbrot is a mathematician.
  277.  I did not know how to contact any of the first three in this list, so I
  278.  could not ask for any type of permission to release the related clients.
  279.  If any of them doesn't like to see his creations in my clients, I will
  280.  remove the offending clients from this archive. Anyway I am not making any
  281.  money from this work, so I hope they won't get upset 8-)
  282.  Of course Fred Fish is allowed to include this program in his library.
  283.  I know there are other people doing like Fred: they are allowed to distri-
  284.  bute BServer if the former conditions are respected.
  285.  This program is CARDWARE. If you use it you *MUST* send @{"me" link AUTHOR} a postcard from
  286.  your city/country.  He who uses this program not having sent me a postcard
  287.  can be prosecuted by diarrhoea, data loss, expired driving licence. I aint
  288.  asking a lotta money from your pockets, just a stamp! :-)
  289.  ---------------------------------------------------------------------------
  290. @ENDNODE
  291. @NODE WHATIS "What have we got?"
  292.  WHAT IS BSERVER?
  293.  ---------------------------------------------------------------------------
  294.  1) HOW IT WAS BORN
  295.  Well, here's a program you can happily live without. It is a screen blanker
  296.  tha... hey! Wait!  Don't delete it immediately!  It's NOT a common blanker!
  297.  Infact, it is a SERVER for other blankers.  It was born because of two main
  298.  reasons: First, I somewhat liked a similar program for another machine: the
  299.  well-known AfterFart
  300.  for FuckinTrash
  301.  computer family (IS it a computer?),
  302.  but, luckily, I do not own a similar machine.  And second, I'm really bored
  303.  with the Blanker that comes along with Workbench.  So,  I thought to code a
  304.  blanker on my own. But I said, "Maybe other people want to build a blanker,
  305.  and maybe they're not so good at coding  or they're just (like me) too lazy
  306.  to start reading Includes and AutoDocs. Or maybe they just don't have them,
  307.  like my friend Luca Viola, who often asks me to lend them to him! >B-("
  308.  So I decided to program BServer. This program was made to help people build
  309.  their own screen blankers.
  310.  2) FEATURES (or: how does this program work)
  311.  Mainly, BServer does this:  it blanks the screen if the user does not press
  312.  any key, move the mouse, insert a disk and the computer does not pop up any
  313.  requester. (Everybody says "ooooh" ;-) BServer is a modular screen blanker;
  314.  it does not check for CPU usage, it runs its clients at a -5 priority.
  315.  3) CLIENTS
  316.  The magic is the way the screen is blanked.  Screen blanking can be done by
  317.  clients.  What are they?  A client is a program that having handshaked with
  318.  BServer is now blanking the screen and waiting BServer to tell him to stop.
  319.  Clients will be launched only when they are needed, and will quit when they
  320.  aren't needed any more.   This allows BServer to use a very small amount of
  321.  RAM. If a client fails another one will be choosen.  This can proceed up to
  322.  Builtin Blanker.
  323.  If you run a client (double-clicking on its icon or like that) when BServer
  324.  is active, this will immediately blank the screen. Note that the client may
  325.  fail if it needs some @{"parameters" link CLIENTS 27}, or it may refer to some default ones.
  326.  A running client may be stopped after a while and a new one started instead
  327.  (of course this amount of time can be changed).
  328.  Clients make use of their custom library,  client.library,  to reduce their
  329.  size.  Client.library keeps the code to play Protracker 3.00 modules & 8SVX
  330.  samples, clone screens,  and of course handle the communication between the
  331.  clients and BServer.
  332.  There is a  ModeID ListView gadget  in BServer's window  containing all the
  333.  screenmodes you can use. By default this is hidden, but if you press on the
  334.  'zip' gadget (that one near the window depth gadget) it will pop up.
  335.  Clients should use the selected one.  (At least MY clients try to do that!)
  336.  ---------------------------------------------------------------------------
  337. @ENDNODE
  338. @NODE NEED "What do BServer need?"
  339.  WHAT DOES BSERVER NEED?
  340.  ---------------------------------------------------------------------------
  341.   Kickstart 2.04 should be enough (if it is not, LET ME KNOW!)
  342.   Some clients to have fun with!
  343.     I enclosed 40 clients;  it's up to you to increase their number!  If you
  344.     write some clients and you think they're nice, stupid or crazy enough to
  345.     be enclosed in this collection just send them to @{"me" link AUTHOR} and I will put them
  346.     in future releases of this archive!
  347.  ---------------------------------------------------------------------------
  348. @ENDNODE
  349. @NODE INSTALLING "Installing BServer"
  350.  ---------------------------------------------------------------------------
  351.  To install this program, you have to
  352.  1) extract the archive (you have already done that ;-)
  353.  2) delete the Sources archive, if you are not interested in it (e.g. you
  354.     are not a programmer or your programs are far better than mine ;-)
  355.  3) copy the drawer somewhere in your hard disk
  356.  4) Finally, the libraries part:
  357.     More than a friend of mine a) does not like to put many custom libraries
  358.     in the LIBS drawer or b) does not like to spread parts of a program in
  359.     various drawers or partitions (i.e. they did not like to put BServer,
  360.     or a mere copy of it, in the WBStartup, and the Catalogs in the LOCALE:
  361.     directory). So
  362.  bitmap.library and client.library can be found in the Libs directory;
  363.  BServer itself can now be specified as a tooltype.
  364.     You have to do the following:
  365.  if you want to start BServer at boot time, put a @{"list" link CLIENTLIST} of clients in
  366.       the WBStartup drawer with BServer as default tool, with the DONOTWAIT
  367.       tool specified and PRECISE PATHS to search clients;
  368.  install client.library and bitmap.library in LIBS:, or move them in
  369.       the Clients drawer, as you prefer;
  370.  install BServer.catalog in your LOCALE: directory or leave it in the
  371.       BServer drawer, as you prefer.
  372.  ---------------------------------------------------------------------------
  373. @ENDNODE
  374. @NODE LANGUAGES "About languages..."
  375.  As I think it's real fun and nice to have a program that speaks my language
  376.  I enclosed some catalogs. If you see that your beloved language is not here
  377.  with the others, you can do the following actions:
  378.  Get your language's .ct file in the Sources/Catalogs directory.
  379.  Fill in the entries.
  380.  Send it back to @{"me" link AUTHOR} and I will compile and enclose it in the archive.
  381.  The following catalogs were compiled by:
  382.  Deutsch:   Marcel GRONER (Ironcode) gronm@info.isbiel.ch
  383.  Fran
  384. aise: Alan GUILLEVIC (Kangourou) guillevi@andromede.u-bourgogne.fr
  385.             25, Avenue du MAIL
  386.             21240 TALANT
  387.  Italiano:  me! :-)
  388.  Norsk:     Haavard N. JAKOBSEN (Tittentei) haa_jako@spirea.gih.no
  389.  Svenska:   Richie OLSSON (richie) richie@medio.mh.se
  390.             http://www.medio.mh.se/anvandare/richie/richie.html
  391.  Many thanks ppl!
  392.  PS: I had to do some little retouchs to fit them in the few space I had,
  393.      and to add the new features every time I added a gadget...
  394.      So if there's any error it's my fault! :-)
  395. @ENDNODE
  396. @NODE CLI "From CLI..."
  397.  RUNNING BSERVER FROM CLI
  398.  ---------------------------------------------------------------------------
  399.  If you want to launch  BServer from CLI  you should pass  him its arguments
  400.  according to its template that can of course be popped up with 'BServer ?'.
  401.  The template is: CX_PRIORITY/K/N,CX_POPUP/S,CX_HOTKEY/K,BLANKKEY/K,WLEFT/N,
  402.  WTOP/N,R=RANDOM/S,T=TIMEOUT/N/K,CT=CHANGETIME/N/K,D=DISPLAY/K,L=LIST/K,
  403.  B=BRIGHTNESS/K/N,V=VOLUME/K/N,NM=NOMOUSE/S,ND=NODISK/S
  404.  CX_HOTKEY:       The combination of keys needed to pop up BServer's window.
  405.                   Defaults to <lalt b>.
  406.  Here's a brief explanation of the non-standard voices:
  407.  BLANKKEY:        A key that if pressed will tell BServer to start blanking.
  408.                   (This is to enable  the user to be able  to blank at will,
  409.                   without having to open BServer's window.)
  410.                   Default is <ctrl lalt b>.
  411.  WLEFT, WTOP:     Screen  relative  coordinates for the upper left corner of
  412.                   BServer's window. If they are not present, the window will
  413.                   be centered.
  414.  RANDOM:          Determines if BServer should choose casually from its list
  415.                   of clients.  If it's set then its builtin blanker will not
  416.                   be choosen.  (That is because it could be annoying to look
  417.                   at a black screen having other nice progs drawing birds or
  418.                   fishes or girls :-) etc...)  I decided to provide you with
  419.                   a client named  "BlackScreen" that (guess?) pops up only a
  420.                   black screen, just in case you can't live without it. ;-)
  421.  TIMEOUT=SECONDS: Determines the amount of time that  should pass before our
  422.                   server starts its activity.  BServer considers the 0 value
  423.                   as inactivity (anyway blanking actions may be started with
  424.                   the Blank gadget or with the blankkey).
  425.  CHANGETIME=SECONDS: Determines the amount of time before  the active client
  426.                   should be changed.  0 means no change.  THIS WORKS ONLY IF
  427.                   CLIENTS ARE CHOOSEN RANDOMLY
  428.  DISPLAY=ModeID:  Determines the preferred display type;  it should be based
  429.                   upon the monitor and the language you use. Example: if you
  430.                   use English use "DISPLAY=NTSC:Super-High Res Laced" but if
  431.                   you use Italian, use "DISPLAY=NTSC:Super-Alta ris. inter."
  432.  LIST=filename:   The name of the list containing desired clients. This file
  433.                   will be loaded and kept in memory;  within its entries the
  434.                   server will choose a file and launch it.   Default file is
  435.                   @{"ClientList" libk CLIENTLIST}.  *Be sure* you provide a correct path within
  436.                   clients' names if they are not in the curent directory, or
  437.                   BServer may not find them.
  438.  BRIGHTNESS=PERCENTAGE:   Specifies  the effective brightness  of the screen
  439.                   the user wants, from 0 (black) to 100 (normal).  So if you
  440.                   think  these blankers have  too shiny colors,  just reduce
  441.                   the brightness from here, not from your monitor.
  442.                   FadeScreen handles a BRIGHTNESS argument overriding this.
  443.  VOLUME=PERCENTAGE:  Specifies the volume level the user wants, from 0 (that
  444.                   is silence) to 100 (normal). So if you think some blankers
  445.                   are too noisy just reduce their volume from here, not from
  446.                   your monitor or hi-fi or whatever you use.
  447.  NOMOUSE:         Blanker won't be stopped by mouse movements (but will stop
  448.                   if a button is pressed or released).
  449.  NODISK:          Blanker won't be stopped by disk insertion or removal.
  450.  You can quit BServer by sending a CTRL_C to the program.
  451.  ---------------------------------------------------------------------------
  452. @ENDNODE
  453. @NODE WBENCH "From Workbench..."
  454.  USING BSERVER FROM WORKBENCH
  455.  ---------------------------------------------------------------------------
  456.  Just double-click on its icon.  You can specify  the CLI options by writing
  457.  them in its ToolTypes. (See @{"RUNNING BSERVER FROM CLI" link CLI}.)
  458.  The popkey is by default lalt-b  (of course everything can be changed, just
  459.  modify the tooltypes of BServer).  In the program's interface you'll find a
  460.  lot of gadgets that control:
  461.  the time that must pass before any blanking action,
  462.  the time that must pass before a client is changed with another one,
  463.  the desired brightness and volume level (in percentage),
  464.  the random gadget (controls wether clients should be choosen randomly, or
  465.    if the selected client should be used instead),
  466.  the usual hide/quit gadget,
  467.  the blank gadget (act immediately), has the same effect as he blankkey,
  468.  the parameters gadget (useful to change parameters of the single clients
  469.    without having to quit and restart),
  470.  the add gadget (to add some clients to the list),
  471.  the remove gadget (to remove the selected client from the list),
  472.  the listview containing all the possible blankers the program can run,
  473.  the listview containing the possible screenmodes.
  474.  In the menues you can find an Events voice, in which you can select/exclude
  475.  the input events that would normally stop the blankers (mouse movements and
  476.  disk insertion/removal) ...I did that mainly because my mouse is nasty! :-)
  477.  You can specify BServer as the default tool for a clients' list,  this will
  478.  prevent BServer from searching "ClientList" and force it to use your list.
  479.  Clicking on BServer,  holding shift-key and double-clicking on the icon has
  480.  the same effect (of course!).
  481.  ---------------------------------------------------------------------------
  482. @ENDNODE
  483. @NODE CLIENTLIST "ClientList file format"
  484.  ---------------------------------------------------------------------------
  485.  At launch time BServer will try to get a file called ClientList.  This file
  486.  contains a serie of rows, each containing "<NAME>: <PROGRAM> <PARAMETERS>".
  487.  These stand for the name a client should be known under,   the real name of
  488.  the program and the program's parameters. To understand this check the rows
  489.  in ClientList related to MultiLine 8-)
  490.  <NAME>s will appear in the listview gadget containing the clients names.
  491.  They must not be longer than 50 characters.   They are just symbolic names,
  492.  and may be different from the name of the client they refer to.
  493.  <PROGRAM>s will be called through SystemTagList(),  they must not be longer
  494.  than 150 chars; these are the actual clients (external programs)  that will
  495.  blank the screen.
  496.  <PARAMETERS> will be passed to programs after having opened a communication
  497.  channel with BServer. They must not be longer than 1024 chars. To help  you
  498.  passing filenames (or anything containing spaces) as parameters,  these can
  499.  be passed between a couple of  <'>  or  <">.  Parameters may be modified by
  500.  changing them in the parameters gadget, the one under the clients viewlist.
  501.  If while launching BServer you pass him another file as argument  (i.e., if
  502.  you click once on BServer's icon, hold shift-key pressed, then double-click
  503.  on another list's icon) this file will override ClientList. So you can just
  504.  create more lists and for example put one of these in the WBStartup drawer.
  505.  (In that case remember to put aldo the DONOTWAIT tooltype in the icon.)
  506.  The same result can be achieved if you specify  BServer as the default tool
  507.  of a clients list and then double-click on its icon.
  508.  ---------------------------------------------------------------------------
  509. @ENDNODE
  510. @NODE CLIENTS "More about clients"
  511.  CLIENTS AND ECS
  512.  ---------------------------------------------------------------------------
  513.  Clients check which chip set is currently installed so they can adapt their
  514.  screens to the preferred screen mode.  So you can use all clients even with
  515.  ECS (but of course you can loose resolution, colors, etc... Get AGA!).
  516.  If a client cannot satisfy user's screen mode (e.g. 16 colors superhires on
  517.  an ECS machine), it will adapt the resolution to a displayable one (in this
  518.  case hires). If it is still not possible to open the screen the client will
  519.  report his failure to BServer, that will invoke another one.
  520.  Some clients MAY work with ECS,  it depends on the Display ID of the front-
  521.  most screen.   These clients actually need to clone it but adding SOME MORE
  522.  bitplanes. Thus it  may  be  possible that  they can't  open the new screen.
  523.  Within these,  Shadow and Spotlight  need just one more bitplanes, so it is
  524.  possible for them to work under ECS.
  525.  Lemming, Zangief, World and Dhalsim need at least 5 bitplanes (they *WON'T*
  526.  won't under ECS... unless the screen is a  LORES, 4  bitplanes maximum...).
  527.  World is like them but has a CUSTOMSCREEN parameter that allows him to open
  528.  on a custom LORES screen.
  529.  If Multiline is asked to work on the frontmost screen it will try to open a
  530.  screen  deeper for  color flashing;  if it is not possible  it will use the
  531.  same depth of the screen.
  532.  DisplayIFF  and  Plasma do not depend on the frontmost screen,  just on the
  533.  user's preferred screen mode.
  534.  ---------------------------------------------------------------------------
  535.  CLIENTS AND PARAMETERS
  536.  ---------------------------------------------------------------------------
  537.  The following clients accept some parameters:
  538.  Balls:
  539.  You can specify BALLS number - min. 1, max 8 (defaults to 5).
  540.  Clock:
  541.  You can specify FONTNAME (with trailing ".font") and FONTHEIGHT. This will
  542.  be the font used by this blanker.
  543.  DisplayIFF:
  544.  You can specify a PICTURE parameter that will contain the name if the ILBM
  545.  that will be used during screen blanking (loaded only when needed). Please
  546.  note that HAM mode is not supported by the @{"bitmap.library" link CUSTOMLIBS} scaling routine.
  547.  If use a very large picture you will notice that  it will be slow to scale
  548.  it so it will be slow to get back to Workbench :-)
  549.  The other parameter supported is MASK, boolean. That is, it have just to be
  550.  there. If specified your picture will be blitted using color 0 as transpar-
  551.  ent, *BUT* the last plane of the picture will be used for the mask,  so if
  552.  you use this, maximum number of colours will be 128 for an AGA machine.
  553.  (If you use a non-AGA machine you'll get the same 32 colors, 16 for hires.)
  554.  Defaults to the Clients/ILBM/DisplayIFF.BRS file.
  555.  FadeScreen:
  556.  This one accepts a BRIGHTNESS value overriding the one passed by BServer
  557.  (the reason of this is easy to explain: a Brightness value of 100 passed by
  558.  BServer would not blank at all... :-) and a DELAY for color fading that
  559.  ranges from 0 to 100.
  560.  Fortune:
  561.  You can specify FONTNAME and FONTHEIGHT (see Clock). With TEXT you specify
  562.  the text that will be printed. With FILE you specify where to retrieve the
  563.  data. (Defaults to MISC/Fortune.data.)  Data must be plain ascii text with
  564.  cookies separed by  `
  565. ' (ASCII 164).  You can  specify up to 10 text lines
  566.  using a '#' as a line separator. The program will check if every line fits
  567.  in the screen,  otherwise it will  split them.  Eventually in this process
  568.  you could loose the lower lines.
  569.  If you specify a SCROLL parameter you'll get an unique line scrolling thru'
  570.  the screen instead.
  571.  Mandelbrot:
  572.  You can specify the XRES and YRES of the rectangle (they will be cut to the
  573.  screen's dimensions if required) and MAXITERS, the maximum number of iter-
  574.  ations to go before drawing a 'black' pixel. Higher the number more precise
  575.  will be the final result, but slower to achieve it. Standard value is 32.
  576.  MultiLine:
  577.  You can specify the number of GROUPS of lines (limited only by memory, but
  578.  a high number will slow down the system) and the "tail"'s length  (1 to 40,
  579.  default 30);  you can set XSIMM-etry and YSIMM-etry or XYSIMM-etry just by
  580.  inserting these parameters (XYSIMM excludes the others).
  581.  Lines can be  rendered in the frontmost screen  instead of a custom one by
  582.  specifying a FRONTMOSTSCREEN parameter.
  583.  PT_Player:
  584.  You must specify a  Protracker3.0 module name.  You may specify a FILE  (an
  585.  IFF ILBM)  composed of two or more  frames,  each of the  same size  of the
  586.  others, all put together to form a line. From this brush PT_Player will cut
  587.  the frames to render its animation.  In this case you must specify also the
  588.  number of FRAMES (defaults to 6 frames found in Clients/ILBM/PT__Frames.BRS)
  589.  and of VFRAMES (defaults to 1, it's the number of different lines of anim).
  590.  E.g. suppose you have a picture like this:
  591.            +----------+----------+----------+----------+
  592.            | frame1-1 | frame1-2 | frame1-3 | frame1-4 |
  593.            +----------+----------+----------+----------+
  594.            | frame2-1 | frame2-2 | frame2-3 | frame2-4 |
  595.            +----------+----------+----------+----------+
  596.            | frame3-1 | frame3-2 | frame3-3 | frame3-4 |
  597.            +----------+----------+----------+----------+
  598.  In this case you have FRAMES=4 and VFRAMES=3.
  599.  VFRAMES are considered cyclical (i.e. they must be between 1 and 4, if they
  600.  are less than 4 (1 vframe per voice) they will be repeated).
  601.  Remember frames are of the same size and not separed in any way.
  602.  RandomDots:
  603.  You can specify the SIZE of the small squares, from 1 to 32.
  604.  Shuffle:
  605.  You can specify a number of slices between 2 and 5; the higher this number
  606.  the higher the squares' number the frontmost screen will be divided into.
  607.  World:
  608.  If you put  CUSTOMSCREEN  it will  open in  a custom screen instead of the
  609.  frontmost one.
  610.  ---------------------------------------------------------------------------
  611. @ENDNODE
  612. @NODE WRITING_CLIENTS "How can I write a client?"
  613.  WRITING CLIENTS
  614.  ---------------------------------------------------------------------------
  615.  If you decide to write a client  you should not worry too much about how to
  616.  handshake with BServer etc.,  (all the routines are included in client.lib)
  617.  but eventually you MUST tell the server you could not perform the required
  618.  blanking actions  (e.g. could not open a screen for low memory conditions).
  619.  Check if the machine you're running on has got AGA or not, and adapt to it.
  620.  Respect the user's preferred screenmode.  There are some standard sequences
  621.  of commands  in my sources to do that,  you can use them (check  expecially
  622.  Sources/Clients/Generic.c).
  623.  I have included with the distribution  the files needed to write a client:
  624.  client.h (to be included within a client source)  and client.lib  (to link
  625.  with the object). You can also look at a general client structure in one of
  626.  my clients, like StarField.c, BlackScreen.c, etc.
  627.  Read also the @{"included autodocs" link AUTODOCS} to use client.library properly.
  628.  Many of my clients use @{"bitmap.library" link CUSTOMLIBS} to reduce their size.
  629.  The following clients have different authors:
  630.  Mandelbrot, Plasma, Hopalong, Life: Luca Viola and me.
  631.  RastaParrot: the concept is Copyright 
  632.  by Massimo Capanni, coding by me.
  633.  KillDMA: From an idea of Gianluca Marcoccia... It's USELESS! :-) Maybe I
  634.           should remove it from this archive...
  635.  The remaining: all by me.
  636.  ---------------------------------------------------------------------------
  637. @ENDNODE
  638. @NODE CUSTOMLIBS "bitmap.library"
  639.  ---------------------------------------------------------------------------
  640.  bitmap.library (currently version 1.4) is Copyright 
  641.  1994-1995 by me,
  642.  that is Stefano Reksten, and it's FREEWARE. You are free to use it in your
  643.  programs, but I retain the rights on it.
  644.  client.lib is useless if not used for BServer clients! :-)
  645.  Well, maybe some routines can be freely copied in other programs...
  646.  ---------------------------------------------------------------------------
  647. @ENDNODE
  648. @NODE HISTORY "Once upon a day... what will the future bring"
  649.  HISTORY:
  650.  ---------------------------------------------------------------------------
  651.  May  5, 1994 : V1.0 - First release (alpha).
  652.  May 27, 1994 : V1.1 - ClientList and DisplayID were added (thanks must go
  653.                        to Luca Viola for the idea), linking libraries were
  654.                        debugged and transformed to shared to reduce clients'
  655.                        size (client.library and bitmap.library).
  656.  Nov 25, 1994 : V1.2 - Some bugs removed (thanks to Enforcer, SegTracker and
  657.                        FindHit!). Clients will be launched when needed, not
  658.                        at start time. -> All clients rewritten (shorter!),
  659.                        some BServer routines re-made from scratch.
  660.  Nov 27, 1994:         "Line" and "KillDMA" added.
  661.  Nov 29, 1994:         "Clock" added.
  662.  Jan  8, 1995:         Removed a bug in bitmap.library; Mandelbrot,Fireworks
  663.                        and Balls reworked.
  664.  Jan 18, 1995:         CTRL-C added.
  665.                        (V1.1 and V1.2 were internal releases - just 
  666. -tests)
  667.  Jan 20, 1995: V1.3 -  Localized and made SMALLER than ever before!
  668.                        "ScreenFall" and "Mandel881" added.
  669.  Jan 21, 1995:         Locale + Font adaptive.
  670.  Jan 23, 1995:         "Shade" added.
  671.  Jan 24, 1995:         Brightness added, "active" gadget removed (useless!).
  672.  Jan 29, 1995:         Some clients were made aware of AGA/non-AGA machines.
  673.  Jan 30, 1995:         A bug concerning TimeOut gadget removed.
  674.  Jan 31, 1995:         Menues added.  Now InputEvents can be "filtered" out.
  675.  Feb  6, 1995:         Bug preventing BServer to work under 2.0 fixed.
  676.  Mar  6, 1995:         Empty lines in client's list won't appear any more.
  677.  Mar  8, 1995:         Added "Hopalong"; improved "Life".
  678.  Mar  9, 1995:         Added "Plasma". (Thanks to Luca Viola for the plasma
  679.                        source, but as ALWAYS >I< had to interface it! B-)
  680.  Mar 17, 1995:         Removed a bug preventing another client from starting
  681.                        after first one failed.
  682.  Mar 20, 1995: V1.4 -  BServer can be a default tool; archive reworked.
  683.  Mar 22, 1995:         A bug in askfiles.c removed.
  684.  Apr 11, 1995:         A bug in the listview removed; "Text", "Multiline"
  685.                        and "Eyes" added.
  686.  Apr 11, 1995:         "SpecuLine" and "ScrLine" added. Well I really LOVE
  687.                        lines ;-)
  688.  Apr 26, 1995:         "Shuffle", "Noise" and "Majiks" added.
  689.  Apr 27, 1995:         8SVX support added. "TicTacToe" and "Worms" added.
  690.  Apr 28, 1995:         "Lightning" added. Size of many clients reduced.
  691.  Apr 29, 1995:         Added PlayAsynch8SVX() to client.library.
  692.                        Autodocs for client.library moved in this guide.
  693.  Apr 30, 1995:         A bug in random clients' selection removed.
  694.                        "Curves" added.
  695.  May  7, 1995:         "Scroller" added.
  696.  May  8, 1995:         "Spotlight" added. Shutscreen reworked.
  697.  Jun  6, 1995:         "World" added.
  698.  Jun  9, 1995:         "Lemming" added.
  699.  Jun 15, 1995:         "Hopalong881" added (well, just recompiled ;)
  700.                        Enough stack given to Mandel881, to make it work! :-(
  701.  Jul  2, 1995: V1.5 -  QuadLine, SpecuLine, Line and ScrLine removed...
  702.                        Don't worry, they are emulated via MultiLine :-)
  703.                        Mandel881 and Hopalong881 removed, Mandelbrot and
  704.                        Hopalong will check for 68881/68882/68040.
  705.                      ->Parameters passing via ClientList instead of tooltype
  706.                        reading in clients, parameters gadget added.
  707.  Jul 25, 1995:         Change time gadget added.
  708.  Sep  6, 1995:         All the icons support the NewIcon package by Nicola
  709.                        Salmoria. Blank key handling improved.
  710.  Sep 23, 1995:         Protracker 3.0 module support and "PT_Player" added.
  711.                        Added hotkey to blank immediately.
  712.  Oct 21, 1995:         "RandomDots" and "Invaders" added. "Majiks" enhanced.
  713.  Oct 23, 1995:         "Fortune" added (Text and Scroller absorbed in it).
  714.  Nov  5, 1995:         "Melt" and "Maze" added.
  715.  ---------------------------------------------------------------------------
  716.  TO DO:
  717.  ---------------------------------------------------------------------------
  718.  Some other nice clients: Aquarium, Flying Things (Toilets, Toasters,
  719.    RastaParrot, ZioPanubio
  720. ...), 3D starfield, Swarm, Rain, Tetris,
  721.    Bubble Bobble, FracTunnel, 3D lines (configurable), Asteroids...
  722.  Realize your ideas! (If it's not too difficult ;-)
  723.  ---------------------------------------------------------------------------
  724. @ENDNODE
  725. @NODE BUGS "Bugs :-("
  726.  KNOWN BUGS:
  727.  ---------------------------------------------------------------------------
  728.  PT_Player does not check if it is passed a proper Protracker3.0 module
  729.  (just checks for 'M.K.'). This may trash your memory.
  730.  I fixed all the bugs I've found or that have been reported.
  731.  I don't exclude there can be some other bugs left.  *BUT* you have also the
  732.  sources. So please, before writing me... if you can, check out what was it!
  733.  This is only a CARDWARE program...  And as I have NEVER received a postcard
  734.  from anywhere yet for this program... I won't correct any bug! >:-
  735.  OK, if you just can't find what the error is,  or have some brilliant ideas
  736.  or want to flame me, report something else, etc, etc... write @{"me" link AUTHOR}!
  737.  ---------------------------------------------------------------------------
  738. @ENDNODE
  739. @NODE TROUBLE
  740.  T:After having extracted the archive and dragged it anywhere, BServer runs
  741.    but the clients don't.
  742.    S:Remember to copy the libraries in LIBS: (or in the Clients') directory.
  743.  T:If I launch some clients from CLI, they don't blank!
  744.    S:If the clients need any parameter, no way! You have to pass their parms
  745.      through BServer's GUI.
  746.  T:I pass a file as a parameter but the blanker won't accept it!
  747.    S:If the file's name contains some spaces, you can pass it between <'> or
  748.      <">. Example: "Data:Modules:mod.my preferred mod" or 'Data:mod.a b c d'
  749.  T:There are not many clients!
  750.    S:Why don't you make some? :-)
  751.  T:BServer doesn't run under my PC clone with windows etc.
  752.    S:Get a life.
  753. @ENDNODE
  754. @NODE AUTHOR "That's me!!!"
  755.  HOW TO CONTACT THE AUTHOR:
  756.  ---------------------------------------------------------------------------
  757.  You can E-mail your messages (or clients!) at this address:
  758.      rekststef@unisi.it
  759.  or snail mail to:
  760.      Stefano Reksten c/o Naimi,
  761.      viale Cavour, 40
  762.      53100 Siena
  763.      Italy
  764.  Have fun!!!
  765.  ---------------------------------------------------------------------------
  766. @ENDNODE
  767. @NODE AUTODOCS Autodocs
  768.                         Autodocs for client.library
  769.                                     or
  770.                            how to write a client
  771.  @{"OVERVIEW" link OVERVIEW}
  772.  Here's the complete documentation of the function you can use to
  773.  interact with your server. (Internal only functions are not documented.)
  774.  @{"OpenCommunication" link OPENCOMMUNICATION}
  775.  @{"CloseCommunication" link CLOSECOMMUNICATION}
  776.  @{"SendClientMsg" link SENDCLIENTMSG}
  777.  @{"GetServerCommand" link GETSERVERCOMMAND}
  778.  @{"WaitServerCommand" link GETSERVERCOMMAND}
  779.  @{"DISPLAYID" link DISPLAYID}
  780.  @{"FILTEROUT" link FILTEROUT}
  781.  @{"GET...RECT" link GETRECT}
  782.  @{"GETBRIGHTNESS" link GETBRIVOL}
  783.  @{"GETVOLUME" link GETBRIVOL}
  784.  @{"RECTANGLEWIDTH" link RECTDIMS}
  785.  @{"RECTANGLEHEIGHT" link RECTDIMS}
  786.  @{"SpritesOff" link SPRITESOFF}
  787.  @{"SpritesOn" link SPRITESON}
  788.  @{"CheckAA" link CHECKAA}
  789.  @{"CloneFrontmostScreen" link CLONEFRONTMOSTSCREEN}
  790.  @{"GetDeeperFrontmostScreen" link GETDEEPERFRONTMOSTSCREEN}
  791.  @{"DarkestColorIndex" link DARKESTCOLORINDEX}
  792.  @{"BrightestColorIndex" link BRIGHTESTCOLORINDEX}
  793.  @{"Open8SVX" link OPEN8SVX}
  794.  @{"Close8SVX" link CLOSE8SVX}
  795.  @{"Play8SVX" link PLAY8SVX}
  796.  @{"PlayAsynch8SVX" link PLAYASYNCH8SVX}
  797.  @{"OpenModule" link OPENMODULE}
  798.  @{"InitModule" link INITMODULE}
  799.  @{"PlayModule" link PLAYMODULE}
  800.  @{"StopModule" link STOPMODULE}
  801.  @{"FreeModule" link STOPMODULE}
  802.  @{"Decrunch30" link DECRUNCH30}
  803.  @{"GetArgString" link GETARGSTRING}
  804.  @{"GetArgInt" link GETARGINT}
  805.  @{"ObtainAnyFont" link OBTAINANYFONT}
  806. @ENDNODE 
  807. @NODE OVERVIEW "What should a client do?"
  808.  What's to do:
  809.  When blanking is needed, BServer will choose a client and launch it.
  810.  So when you are launched, it's supposed you will blank the screen, or
  811.  at least do something that will change the screens colors in order to
  812.  save your monitor's phosphors.
  813.  OpenCommunication() will return you a DisplayIDInformation structure.
  814.  In this structure you'll find the user's preferred display id, overscan
  815.  dimensions, a parameters line, etc. (Its name lasts just for historical
  816.  reasons, seeing all the things this structure sontains ;)
  817.  OpenCommunication() *MUST* be called *ONCE* in order to establish a
  818.  channel between your program and BServer, that will tell him when to
  819.  stop. If anything goes wrong with memory allocation or this kind of stuff
  820.  SendClientMsg( ACTION_FAILED ) will tell BServer to run another client
  821.  from its list (or to use its builtin blanker). Check when to stop using
  822.  GetServerCommand() or WaitServerCommand(): when any input activity takes
  823.  place, BServer will issue you a COMMAND_QUIT. So long, you aren't needed
  824.  anymore. Do your cleanup, CloseCommunication(<your DisplayIDInformation>)
  825.  and exit.
  826.  Have fun! :-)
  827. @ENDNODE
  828. @NODE OPENCOMMUNICATION
  829.  NAME
  830.    OpenCommunication
  831.  SYNOPSIS
  832.                            dinfo = OpenCommunication()
  833.    struct DisplayIDInformation * = OpenCommunication()
  834.  FUNCTION
  835.    Opens a connection between your blanker (client) and the server.
  836.    @{I}Opens client.library . ClientBase is kept in client.lib, so you do
  837.    not need to open it any more. client.library will be closed on exit.@{UI}
  838.  RESULTS
  839.    A DisplayIDInformation if communication was opened, NULL otherwise.
  840.  SEE ALSO
  841.    @{"CloseCommunication()" link CLOSECOMMUNICATION}
  842. @ENDNODE
  843. @NODE CLOSECOMMUNICATION
  844.  NAME
  845.    CloseCommunication
  846.  SYNOPSIS
  847.         CloseCommunication( dinfo )
  848.    void CloseCommunication( struct DisplayIDInformation * )
  849.  FUNCTION
  850.    Closes communication between your client and the server. @{I}Frees the
  851.    structure returned by OpenCommunication. Closes client.library.@{UI}
  852.  SEE ALSO
  853.    @{"OpenCommunication()" link OPENCOMMUNICATION}
  854. @ENDNODE
  855. @NODE SENDCLIENTMSG
  856.  NAME
  857.    SendClientMsg
  858.  SYNOPSIS
  859.    success = SendClientMsg( action )
  860.       BOOL = SendClientMsg( ULONG )
  861.  FUNCTION
  862.    Sends a message to the server (waiting reply). Of course, your
  863.    client should already have opened a communication with the server.
  864.  INPUTS
  865.    action: an UBYTE describing the action you're performing. This may be:
  866.           
  867.  ACTION_FAILED  (You couldn't start your blanking actions,
  868.                            so you are telling the server to ask
  869.                            another blanker.)
  870.  RETURNS
  871.    TRUE if message was received, FALSE otherwise.
  872.  SEE ALSO
  873.    @{"OpenCommunication()" link OPENCOMMUNICATION}
  874. @ENDNODE
  875. @NODE GETSERVERCOMMAND
  876.  NAME
  877.    GetServerCommand, WaitServerCommand
  878.  SYNOPSIS
  879.    command = GetServerCommand()
  880.    command = WaitServerCommand()
  881.      UBYTE = GetServerCommand()
  882.      UBYTE = WaitServerCommand()
  883.  FUNCTION
  884.    It returns the command sent by the server. The difference between
  885.    the two functions is that GetServerCommand checks the communication
  886.    port searching for any message coming from the server, while
  887.    WaitServerCommand will make your program wait until a command
  888.    (different from COMMAND_IDLE) is received.
  889.    The server may send you these commands:
  890.  COMMAND_IDLE:    the CommunicationPort is empty. This one can be
  891.                       obtained only with GetServerCommand.
  892.  COMMAND_QUIT:    the server is asking you to quit.
  893.    Note that GetServerCommand POLLS the port so don't use it out of any
  894.    rendering (or something else) cycle. Use WaitServerCommand instead.
  895.   There is a macro, STILL_BLANKING, that checks if the server is stopping
  896.   us; an example of its usage may be:
  897.   while( STILL_BLANKING )
  898.      {
  899.      RenderSomething();
  900.      }
  901.  SEE ALSO
  902.    any client's source
  903. @ENDNODE
  904. @NODE DISPLAYID
  905.  NAME
  906.    DISPLAYID
  907.  SYNOPSIS
  908.    DisplayID = DISPLAYID( dinfo )
  909.        ULONG = DISPLAYID( struct DisplayIDInformation * )
  910.  MACRO
  911.    This macro returns you an ULONG containing the screen mode choosen
  912.    by the user for a client.
  913. @ENDNODE
  914. @NODE FILTEROUT
  915.  NAME
  916.    FILTEROUT
  917.  SYNOPSIS
  918.    newDisplayID = FILTEROUT( oldDisplayID, flags_to_remove )
  919.           ULONG = FILTEROUT( ULONG,        ULONG )
  920.  MACRO
  921.   This macro removes all the unwanted flags from a DisplayID, e.g.:
  922.   you are told to blank; the server sent you also the preferred
  923.   screenmode (stored in dinfo). You want to filter SUPERHIRES mode
  924.   and LACE flag but want a hires screen. You could pass as value
  925.   for SA_DisplayID this value:
  926.   FILTEROUT( DISPLAYID(dinfo) | HIRES, SUPERHIRES|LACE )
  927.  SEE ALSO
  928.    @{"GetServerCommand(), WaitServerCommand()" link GETSERVERCOMMAND}
  929. @ENDNODE
  930. @NODE GETRECT
  931.  NAME
  932.    GETSTANDARDRECT   
  933.    GETMAXOSCANRECT
  934.    GETVIDEOOSCANRECT
  935.    GETTXTOSCANRECT
  936.    GETSTDOSCANRECT
  937.  SYNOPSIS
  938.             rectangle = GET...RECT( dinfo )
  939.    struct Rectangle * = GET...RECT( struct DisplayIDInformation * )   
  940.  MACRO
  941.    These macro return the address of a Rectangle structure containing
  942.    a certain overscan value. (As ever, the DisplayIDInformation
  943.    structure was allocated by your server.)
  944. @ENDNODE
  945. @NODE GETBRIVOL
  946.  NAME
  947.   GETBRIGHTNESS
  948.   GETVOLUME
  949.  SYNOPSIS
  950.   brightnes_level = GETBRIGHTNESS( dinfo )
  951.      volume_level = GETVOLUME( dinfo )
  952.             UBYTE = GETBRIGHTNESS( struct DisplayIDInformation )
  953.             UBYTE = GETVOLUME( struct DisplayIDInformation )
  954.  MACRO
  955.   These two macro return you the desired level of brightness and volume
  956.   the user wants to get. Of course you don't have to respect them but in
  957.   general you should. A program that does not respect GETBRIGHTNESS is
  958.   FadeScreen (but it is due to its nature :-).
  959.   Thus you can do for example
  960.   bri = GETBRIGHTNESS(dinfo);
  961.   volume = GETVOLUME(dinfo);
  962.   /* ... */
  963.   LoadRGB4( vp, 1, 5*bri/100, 12*bri/100, 15*bri/100 );
  964.   /* ... */
  965.   Play8SVX( my_sound, volume );
  966.   /* ... */
  967. @ENDNODE
  968. @NODE RECTDIMS
  969.  NAME
  970.   RECTANGLEWIDTH
  971.   RECTANGLEHEIGHT
  972.  SYNOPSIS
  973.    width = RECTANGLEWIDTH( rect )
  974.   height = RECTANGLEHEIGHT( rect )
  975.    UWORD = RECTANGLEWIDTH( struct Rectangle * )
  976.    UWORD = RECTANGLEHEIGHT( struct Rectangle * )
  977.  MACRO
  978.   This macro returns the current width/height for a screen from a
  979.   Rectangle structure.
  980.   Example: OpenScreenTags( NULL,
  981.              SA_Width, RECTANGLEWIDTH( GETTXTOSCANRECT(dinfo) ), ...
  982. @ENDNODE
  983. @NODE SPRITESOFF
  984.  NAME
  985.   SpritesOff()
  986.  SYNOPSIS
  987.   SpritesOff()
  988.  FUNCTION
  989.   Disables sprite DMA, removes sprite from screen.
  990.   Remember that @{I}performing a ScreenToFront action (when doublebuffering)
  991.   or similar will activate sprite DMA again.@{UI}
  992.  SEE ALSO
  993.   @{"SpritesOn()" link SPRITESON}, Balls.c, any other client's source
  994.  BUGS
  995.   Well sprites should remain deactivated...
  996. @ENDNODE
  997. @NODE SPRITESON
  998.  NAME
  999.   SpritesOn()
  1000.  SYNOPSIS
  1001.   SpritesOn()
  1002.  FUNCTION
  1003.   Enables sprite DMA.
  1004.  SEE ALSO
  1005.   @{"SpritesOff()" link SPRITESOFF}
  1006. @ENDNODE
  1007. @NODE CHECKAA
  1008.  NAME
  1009.   CheckAA()
  1010.  SYNOPSIS
  1011.   aa_chipset = CheckAA()
  1012.   BOOL = CheckAA( void )
  1013.  FUNCTION
  1014.   Tells wether AA chipset is installed or not, and if you can use it
  1015.   (that is, if you have kickstart 3.0+ installed). If this function
  1016.   returns FALSE, you have to fall back to 2.0, or to quit. As a general
  1017.   behaviour, a client should fall back to ECS.
  1018. @ENDNODE
  1019. @NODE CLONEFRONTMOSTSCREEN
  1020.  NAME
  1021.   CloneFrontmostScreen()
  1022.  SYNOPSIS
  1023.            screen = CloneFrontmostScreen( brightness_level )
  1024.   struct Screen * = CloneFrontmostScreen( UBYTE )
  1025.  FUNCTION
  1026.   Returns you a pointer to a Screen structure; this is a Screen that is
  1027.   identical to the frontmost screen, although it is automatically put
  1028.   to a Y=0 coordinate. It is up to you to free this screen when you're
  1029.   finished. Colors will be to a brightness_level percent of their original
  1030.   brightness. Valid range is 0-100, although no check is made on that.
  1031. @ENDNODE
  1032. @NODE GETDEEPERFRONTMOSTSCREEN
  1033.  NAME
  1034.   GetDeeperFrontmostScreen()
  1035.  SYNOPSIS
  1036.               scr = GetDeeperFrontmostsScreen( brightness_level, image_depth )
  1037.   struct Screen * = GetDeeperFrontmostScreen( UBYTE,             UBYTE )
  1038.  FUNCTION
  1039.   Returns you a pointer to a Screen structure; this Screen is different
  1040.   from the original frontmost screen in terms of bitplane number (depth).
  1041.   The image_depth referes to an image that the user wants to be printed
  1042.   on the screen; thus (according to the fact that the screen and the image
  1043.   may - and surely will - have different colors in term of RGB components
  1044.   and number) the screen is deeper, it has MAX(image_depth,scr_depth) + 1
  1045.   bitplanes, the last of those will be filled with 1's. The lower and the
  1046.   upper halfs of the colormap will be loaded respectively from color 0 and
  1047.   from color (2<<scr_depth), with a color number that reflects that of the
  1048.   previous frontmost screen. It's up to the user to load properly the first
  1049.   colors with those of the image (from color 1 to color 2<<image_depth-1).
  1050.   This will produce a screen that looks like the previous but really has
  1051.   the colors "shifted" to the upper half of the table. The image can be
  1052.   now drawn using a cookie-cut function like BltMaskBitMapRastPort().
  1053.   brightness_level is used to reduce the brightness of the original screen
  1054.   that has been "cloned". Valid range is from 0 to 100, but no check is
  1055.   made.
  1056.  SEE ALSO
  1057.   @{"CloneFrontmostScreen()" link CLONEFRONTMOSTSCREEN}, any source of a
  1058.   client featuring animation.
  1059. @ENDNODE
  1060. @NODE DARKESTCOLORINDEX
  1061.  NAME
  1062.   DarkestColorIndex()
  1063.  SYNOPSIS
  1064.   index = DarkestColorIndex( screen )
  1065.   UBYTE = DarkestColorIndex( struct Screen * )
  1066.  FUNCTION
  1067.   Returns you the index (pen number) of the darkest color in this screen's
  1068.   colormap. As a technical information, his function is based on the lowest
  1069.   sum of the squares of the single R, G, B components of the colors.
  1070.  SEE ALSO
  1071.   @{"BrightestColorIndex()" link BRIGHTESTCOLORINDEX}
  1072. @ENDNODE
  1073. @NODE BRIGHTESTCOLORINDEX
  1074.  NAME
  1075.   BrightestColorIndex()
  1076.  SYNOPSIS
  1077.   index = BrightestColorIndex( screen )
  1078.   UBYTE = BrightestColorIndex( struct Screen * )
  1079.  FUNCTION
  1080.   Returns you the index (pen number) of the brightest color in this screen's
  1081.   colormap. As a technical information, his function is based on the highest
  1082.   sum of the squares of the single R, G, B components of the colors.
  1083.  SEE ALSO
  1084.   @{"DarkestColorIndex()" link DARKESTCOLORINDEX}
  1085. @ENDNODE
  1086. @NODE OPEN8SVX
  1087.  NAME
  1088.   Open8SVX()
  1089.  SYNOPSIS
  1090.       svx = Open8SVX( name )
  1091.   Sound * = Open8SVX( char * )
  1092.  FUNCTION
  1093.   Loads an IFF-8SVX sample from disk and returns you a pointer to a Sound.
  1094.   You actually don't need to know how this works (well if you're curious
  1095.   you can check it in /include/server.h), you just need the pointer.
  1096.   The 8SVX sample must be 1 octave wide and one shot only.
  1097.  SEE ALSO
  1098.   @{"Close8SVX()" link CLOSE8SVX}, @{"Play8SVX()" link PLAY8SVX}, @{"PlayAsynch8SVX()" link PLAYASYNCH8SVX}, @{"GETVOLUME()" link GETBRIVOL}
  1099. @ENDNODE
  1100. @NODE CLOSE8SVX
  1101.  NAME
  1102.   Close8SVX()
  1103.  SYNOPSIS
  1104.        Close8SVX( svx )
  1105.   void Close8SVX( Sound * )
  1106.  FUNCTION
  1107.   Frees all memory allocated for a Sound.
  1108.  SEE ALSO
  1109.   @{"Open8SVX()" link OPEN8SVX}, @{"Play8SVX()" link PLAY8SVX}, @{"PlayAsynch8SVX()" link PLAYASYNCH8SVX}, @{"GETVOLUME()" link GETBRIVOL}
  1110. @ENDNODE
  1111. @NODE PLAY8SVX
  1112.  NAME
  1113.   Play8SVX()
  1114.  SYNOPSIS
  1115.        Play8SVX( svx,     volume_percentage )
  1116.   void Play8SVX( Sound *, UBYTE )
  1117.  FUNCTION
  1118.   Plays a Sound (a loaded 8SVX sample). It is safe to pass a NULL pointer
  1119.   to this function. This function will fail if someone has allocated all
  1120.   audio channels. This function will return only when the sample has been
  1121.   completely played. If the sound can't be played (because audio channels
  1122.   have been allocated by someone else) this function will wait as if the
  1123.   sound could be played.
  1124.  SEE ALSO
  1125.   @{"Open8SVX()" link OPEN8SVX}, @{"Close8SVX()" link CLOSE8SVX}, @{"PlayAsynch8SVX()" link PLAYASYNCH8SVX}, @{"GETVOLUME()" link GETBRIVOL}
  1126. @ENDNODE
  1127. @NODE PLAYASYNCH8SVX
  1128.  NAME
  1129.   PlayAsynch8SVX()
  1130.  SYNOPSIS
  1131.        PlayAsynch8SVX( svx,     volume_percentage )
  1132.   void PlayAsynch8SVX( Sound *, UBYTE )
  1133.  FUNCTION
  1134.   Plays a Sound (a loaded 8SVX sample). It is safe to pass a NULL pointer
  1135.   to this function. This function will fail if someone has allocated all
  1136.   audio channels. This function returns immediately.
  1137.  SEE ALSO
  1138.   @{"Open8SVX()" link OPEN8SVX}, @{"Close8SVX()" link CLOSE8SVX}, @{"Play8SVX()" link PLAYASYNCH8SVX}, @{"GETVOLUME()" link GETBRIVOL}
  1139. @ENDNODE
  1140. @NODE OPENMODULE
  1141.  NAME
  1142.   OpenModule()
  1143.  SYNOPSIS
  1144.     module = OpenModule( filename )
  1145.   Module * = OpenModule( char * )
  1146.  FUNCTION
  1147.   Loads from disk a music in protracker ('M.K.') module format.
  1148.   Also calls @{"InitModule()" link INITMODULE}.
  1149.  BUGS
  1150.   None known.
  1151.  SEE ALSO
  1152.   @{"InitModule()" link INITMODULE}, @{"PlayModule()" link PLAYMODULE}, @{"StopModule()" link STOPMODULE}, @{"FreeModule()" link FREEMODULE}
  1153. @ENDNODE
  1154. @NODE INITMODULE
  1155.  NAME
  1156.   InitModule()
  1157.  SYNOPSIS
  1158.        InitModule( module )
  1159.   void InitModule( Module * )
  1160.  FUNCTION
  1161.   Prepares a module to be played. This is automatically called by
  1162.   @{"OpenModule()" link OPENMODULE}, and it is meant to be called again to
  1163.   reset the module to its beginning.
  1164.   This function is safe to call with a (Module *) NULL parameter.
  1165.  BUGS
  1166.   None known.
  1167.  SEE ALSO
  1168.   @{"OpenModule()" link OPENMODULE}, @{"PlayModule()" link PLAYMODULE}, @{"StopModule()" link STOPMODULE}, @{"FreeModule()" link FREEMODULE}
  1169. @ENDNODE
  1170. @NODE PLAYMODULE
  1171.  NAME
  1172.   PlayModule()
  1173.  SYNOPSIS
  1174.        PlayModule( module )
  1175.   void PlayModule( Module * )
  1176.  FUNCTION
  1177.   Tries to start a module in background.
  1178.   This function is safe to call with a (Module *) NULL parameter.
  1179.   Uses Protracker 3.0 playroutine.
  1180.  BUGS
  1181.   None known.
  1182.  SEE ALSO
  1183.   @{"OpenModule()" link OPENMODULE}, @{"InitModule()" link INITMODULE}, @{"StopModule()" link STOPMODULE}, @{"FreeModule()" link FREEMODULE}
  1184. @ENDNODE
  1185. @NODE STOPMODULE
  1186.  NAME
  1187.   StopModule()
  1188.  SYNOPSIS
  1189.        StopModule( module )
  1190.   void StopModule( Module * )
  1191.  FUNCTION
  1192.   Stops a module that is being played. This function is called also by
  1193.   @{"FreeModule()" link FREEMODULE}.
  1194.   This function is safe to call with a (Module *) NULL parameter.
  1195.  BUGS
  1196.   None known.
  1197.  SEE ALSO
  1198.   @{"OpenModule()" link OPENMODULE}, @{"InitModule()" link INITMODULE}, @{"PlayModule()" link PLAYMODULE}, @{"FreeModule()" link FREEMODULE}
  1199. @ENDNODE
  1200. @NODE FREEMODULE
  1201.  NAME
  1202.   FreeModule()
  1203.  SYNOPSIS
  1204.        FreeModule( module )
  1205.   void FreeModule( Module * )
  1206.  FUNCTION
  1207.   Calls @{"StopModule()" link STOPMODULE}, then releases memory associated to a module.
  1208.   This function is safe to call with a (Module *) NULL parameter.
  1209.  BUGS
  1210.   None known.
  1211.  SEE ALSO
  1212.   @{"OpenModule()" link OPENMODULE}, @{"InitModule()" link INITMODULE}, @{"PlayModule()" link PLAYMODULE}, @{"StopModule()" link STOPMODULE}
  1213. @ENDNODE
  1214. @NODE DECRUNCH30
  1215.  NAME
  1216.   Decrunch30
  1217.  SYNOPSIS
  1218.   result = Decrunch30( dest_ptr, compressed_data_ptr )
  1219.     BOOL = Decrunch30( UWORD *,  UBYTE * )
  1220.  FUNCTION
  1221.   Decrunches data compressed with BtoC 2.5's BYTERUN2 or upper (a program
  1222.   I made to cut frames... ;-)
  1223. @ENDNODE
  1224. @NODE GETARGSTRING
  1225.  NAME
  1226.   GetArgString
  1227.  SYNOPSIS
  1228.   position = GetArgString( parm_line, string, store_buffer )
  1229.     char * = GetArgString( char *,    char *, char * )
  1230.  FUNCTION
  1231.   Checks if 'string' is contained in 'parm_line'. If it is found this
  1232.   function copies the next parameter in store_buffer (if it is not NULL)
  1233.   and returns a pointer to 'string' in the original 'parm_line'.
  1234.   The reason why the result is copied in a buffer and returned in a pointer
  1235.   is to handle spaces. A message can begin with ' or " (thus it MUST finish
  1236.   with ' or " ), if this happens everything between the '/"s will be copied
  1237.   (also spaces). If a message is not limited by spaces it will end as soon
  1238.   as a space is met.
  1239.   Tipically parm_line is taken from the di_Args field of the
  1240.   DisplayIDInformation structure.
  1241.  SEE ALSO
  1242.   @{"GetArgInt" link GETARGINT}
  1243. @ENDNODE
  1244. @NODE GETARGINT
  1245.  NAME
  1246.   GetArgInt
  1247.  SYNOPSIS
  1248.    value = GetArgInt( parm_line, string )
  1249.   char * = GetArgInt( char *,    char * )
  1250.  FUNCTION
  1251.   Checks if 'string' is contained in 'parm_line'. If it is found this
  1252.   function returns the integer value of the following parameter.
  1253.   Tipically parm_line is taken from the di_Args field of the
  1254.   DisplayIDInformation structure.
  1255.  SEE ALSO
  1256.   @{"GetArgString" link GETARGSTRING}
  1257. @ENDNODE
  1258. @NODE OBTAINANYFONT
  1259.  NAME
  1260.   ObtainAnyFont
  1261.  SYNOPSIS
  1262.                font = ObtainAnyFont( dinfo )
  1263.   struct TextFont * = ObtainAnyFont( struct DisplayIDInformation * )
  1264.  FUNCTION
  1265.   Tries to open any font specified in the DisplayIDInformation; tipically it
  1266.   contains the font specified for a certain client in the parameters gadget of
  1267.   BServer's main window. But if no font is specified it returns, in order,
  1268.   diamond/20, times/24 or topaz/8. The application has to close the font when
  1269.   finished.
  1270. @ENDNODE
  1271.